/******************************************************************************
 * The contents of this file are subject to the   JDI License  Version 1.0
 * ("License"); You may not use this file except in compliance with the License
 * Software distributed under the License is distributed on an  "AS IS"  basis,
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 * the specific language governing rights and limitations under the License.
 * The Initial Developer of the Original Code is 陈慧然. Portions created by 
 * 陈慧然 are Copyright 陈慧然.
 * All Rights Reserved.
 *
 *              Contact john_holen@163.com for licensing alternatives.
 *
 *****************************************************************************/


package org.peony.client.web.ajax;

import java.io.IOException;
import java.io.PrintWriter;
import java.io.Serializable;
import javax.servlet.http.HttpServletResponse;

/**
 *  该类是对javascript XMLHttpRequest类的Java封装。<br>
 *  是Java Ajax的基础类。
 *
 *  @author     陈慧然
 *  @version    Id: XMLHttpRequest.java, v 0.000 2008-2-16 下午02:04:15 陈慧然 Exp
 */
public class XMLHttpRequest implements Serializable{
	
	static final long serialVersionUID = 2389240128937120349L;
	
	public void putXMLHttpRequestJSObject(){
		String createXMLHttpRequest = "<script language=\"javascript\" type=\"text/javascript\"> var request = false; try { request = new XMLHttpRequest(); } catch (trymicrosoft) { try { request = new ActiveXObject(\"Msxml2.XMLHTTP\"); } catch (othermicrosoft) { try { request = new ActiveXObject(\"Microsoft.XMLHTTP\"); } catch (failed) { request = false; } } } if (!request) alert(\"Error initializing XMLHttpRequest!\"); </script> ";
	}
	
}
